﻿using FluentValidation;
using Mes.Application.DTO.Inputs.Quality;

namespace Mes.Application.Web.Validators.Quality
{
    public class SamplePlanAddingInputValidator : AbstractValidator<SamplePlanAddingInput>
    {
        public SamplePlanAddingInputValidator()
        {
            RuleFor(x => x.Freq_Id).GreaterThanOrEqualTo(0).WithMessage("采样计划频率id必须大于等于0");
            RuleFor(x => x.Plan_Name).NotEmpty().WithMessage("采样计划名称不能为空");
            RuleFor(x => x.Sample_Name).NotEmpty().WithMessage("采样命名惯例不能为空");
        }
    }
}
